package com.java.interview.i设计模式.代理模式;

/**
 * @Description:
 * @Auther: sixbing  QQ:414409451
 * @Date: 2018/11/4 13:17
 */
public class Math implements IMath {
    public Math() {

    }

    //加
    public int add(int n1, int n2) {
        int result = n1 + n2;
        System.out.println(n1 + "+" + n2 + "=" + result);
        return result;
    }


    //减
    public int sub(int n1, int n2) {
        int result = n1 - n2;
        System.out.println(n1 + "-" + n2 + "=" + result);
        return result;
    }

    //乘
    public int mut(int n1, int n2) {
        int result = n1 * n2;
        System.out.println(n1 + "X" + n2 + "=" + result);
        return result;
    }

    //除
    public int div(int n1, int n2) {
        int result = n1 / n2;
        System.out.println(n1 + "/" + n2 + "=" + result);
        return result;
    }
//---------------------
//    作者：a31081314
//    来源：CSDN
//    原文：https://blog.csdn.net/a31081314/article/details/78722673
//    版权声明：本文为博主原创文章，转载请附上博文链接！
}
